From: Ray Strode Date: Wed, 20 Feb 2013 02:50:40 +0000 (-0500) Subject: background: destroy actors don't remove them from their parent X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4705 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dcacbb37c35ec6066f7cc5eb836b88c009617717;p=gnome-shell.git background: destroy actors don't remove them from their parent This reads better, and it also fixes a warning when background is changed while transitioning to the overview. https://bugzilla.gnome.org/show_bug.cgi?id=694227 --- diff --git a/js/ui/background.js b/js/ui/background.js index 9d79e434b..8d2a9cce1 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -664,16 +664,12 @@ const BackgroundManager = new Lang.Class({ this.background.disconnect(this._changedSignalId); if (this._newBackground) { - let container = this._newBackground.actor.get_parent(); - if (container) - container.remove_actor(this._newBackground.actor); + this._newBackground.actor.destroy(); this._newBackground = null; } if (this.background) { - let container = this.background.actor.get_parent(); - if (container) - container.remove_actor(this.background.actor); + this.background.actor.destroy(); this.background = null; } }, @@ -695,7 +691,7 @@ const BackgroundManager = new Lang.Class({ onComplete: Lang.bind(this, function() { this.background = newBackground; this._newBackground = null; - this._container.remove_actor(background.actor); + background.actor.destroy(); this.emit('changed'); }) });